package arraysCommonMethods;

import java.util.Arrays;

/**
 * @ClassName ArraysEquals
 * @Description 两个数组内容(元素)的比较
 * @Author 李明忠
 * @Date 2025/5/21 22:39
 * @Version 1.0
 */
public class ArraysEquals {
    public static void main(String[] args) {
        /*
        * Arrays.equals(arr1,arr2);
        * 此方法需要两个参数代表arr1和arr2进行值的比对
        * */
        int[] arr1 = {1,2,3,4,5};
        int[] arr2 = {1,2,3,4,5};
        int[] arr3 = {1,2,10,4,5};
        System.out.println(Arrays.equals(arr1, arr2));
        System.out.println(Arrays.equals(arr1, arr3));
        System.out.println(Arrays.equals(arr2, arr3));
    }
}
